﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="RefeicoesServidas.aspx.cs" Inherits="welwitschia.ServicoRefeicoes.RefeicoesServidas" %>

<%@ Register Assembly="SandTrap.WebControls" Namespace="SandTrap.WebControls" TagPrefix="st" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div id="header" class="info">
            <h2>
                Refeições servidas</h2>
            <div>
            </div>
        </div>
    <div>
    <asp:ListView runat="server" ID="lvRefeicoesServidas"  
            onitemdeleting="lvRefeicoesServidas_ItemDeleting" 
            onitemediting="lvRefeicoesServidas_ItemEditing" 
            onitemcommand="lvRefeicoesServidas_ItemCommand">
        <LayoutTemplate>
            <table runat="server" class="grd2" id="table1">
                <thead>
                     <tr class="ghdr2">
                     <td>
                       <asp:Label ID="lvlblData" runat="server">Data</asp:Label>
                     </td>
                     <td>
                        <asp:Label ID="lvlblUnidade" runat="server">Unidade</asp:Label>
                     </td>
                     <td>
                        <asp:Label ID="lvlblRefeicao" runat="server">Refeicao</asp:Label>
                     </td>
                     <td>
                        <asp:Label ID="lvlblClasse" runat="server">Classe</asp:Label>
                     </td>
                     <td>
                        <asp:Label ID="lvlblNum" runat="server">Qt. Servida</asp:Label>
                     </td>
                     </tr>
                </thead>
                <tr runat="server" id="itemPlaceholder">
                </tr>
            </table>
        </LayoutTemplate>
        <ItemTemplate>
            <tr id="Tr1" class='grd2<%#Container.DataItemIndex % 2 %>' >
                <td id="Td1" runat="server">
                    <%-- Data-bound content. --%>
                    <asp:HiddenField ID="lvhfIdRefeicaoContratada" runat="server" Value='<%#Eval("Refeicao.RefeicaoContratada.IdRefeicaoContratada") %>' />
                    <asp:Label ID="lvlblDataRefeicao" runat="server" Text='<%#Eval("Refeicao.DataRefeicao",  "{0:dd/MM/yyyy}") %>' />
                </td>
                <td id="Td2" runat="server">
                    <%-- Data-bound content. --%>
                    <asp:HiddenField ID="lvhfIdUnidade" runat="server" Value='<%#Eval("Unidade.IdUnidade") %>' />
                    <asp:Label ID="lvlblUnidadeDesignacao" runat="server" Text='<%#Eval("Unidade.Designacao") %>' />
                </td>
                <td id="Td3" runat="server">
                    <%-- Data-bound content. --%>
                    <asp:Label ID="Label2" runat="server" Text='<%#Eval("Refeicao.RefeicaoContratada.TipoRefeicao.Descricao") %>' />
                </td>
                <td id="Td4" runat="server">
                    <%-- Data-bound content. --%>
                    <asp:Label ID="Label3" runat="server" Text='<%#Eval("Refeicao.RefeicaoContratada.TipoClasseRefeicao.Descricao") %>' />
                </td>
                <td id="Td5" runat="server">
                    <%-- Data-bound content. --%>
                    <st:NumberBox ID="lvnbNumRefeicoesServias" CssClass="number" Amount='<%#Eval("RefeicoesServidas") %>' runat="server" />
                </td>
            </tr>
        </ItemTemplate>
    </asp:ListView>
    </div>
    <div class="pageCommandArea">
        <asp:Button ID="btnGravar" runat="server" Text="Gravar"   onclick="btnGravar_Click" />
    </div>
    <asp:HiddenField ID="hfIdUnidade" runat="server" />        
    <asp:HiddenField ID="hfDataRefeicao" runat="server" />
</asp:Content>
